﻿using System;
using CodeCounsel.SharePoint.RibbonDesigner.Model;
using System.Collections.Specialized;
using System.ComponentModel;

namespace CodeCounsel.SharePoint.RibbonDesigner.ViewModel
{
    public class DomainViewModel<T>
        : BaseViewModel
        where T : DomainElement
    {
        protected T Model { get; private set; }
        public DomainModelSource Source { get { return Model.Source; } }

        public DomainViewModel(T model)
        {
            if (model == null)
            {
                throw new ArgumentNullException();
            }
            Model = model;
        }
    }
}
